#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    int removeDuplicates(vector<int>& nums) {
        int cout = 0;
        for (size_t i = 1; i < nums.size(); ++i)
        {
            if (nums[i] != nums[cout])
                nums[++cout] = nums[i];
        }
        return ++cout;
    }
};
int main()
{
    vector<int> v;
    v.push_back(1);
    v.push_back(1);
    v.push_back(2);
    return 0;
}